#define _CRT_SECURE_NO_WARNINGS 1

#include <iostream>
#include <list>
#include <string>
#include <algorithm>
using namespace std;

int main()
{
	list<int> v;
	v.push_back(1);
	v.push_back(2);
	v.push_back(1);
	v.push_back(2);
	v.push_back(5);
	v.push_back(3);
	v.push_back(2);

	auto pos = find(v.begin(), v.end(), 4);
	v.insert(pos, 300);

	// v.erase(find(v.begin(), v.end(), 300));
	// v.erase(pos);
	v.sort();

	for (auto n : v)
	{
		cout << n << " ";
	}
	return 0;
}